'use strict';

/**
 * sessionKey - 数据模型
 * **/

module.exports = app => {
  const mongoose = app.mongoose;

  const SessionKeySchema = new mongoose.Schema({
    thirdSession: {
      type: String,
      displayName: '唯一标识',
      required: true,
    },
    session_key: {
      type: String,
      displayName: 'sessionKey',
      required: true,
    },
    openid: {
      type: String,
      displayName: 'openId',
      required: true,
    },
  });

  return mongoose.model('sessionKey', SessionKeySchema);
};
